package com.laboratory.manage.service.Impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.laboratory.manage.dao.AssetDao;
import com.laboratory.manage.entity.AssetEntity;
import com.laboratory.manage.service.AssetService;
import com.laboratory.manage.utils.PageUtils;
import com.laboratory.manage.utils.Query;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: qinaolong
 * @Date: 2023/05/08/9:47
 * @Description:
 */
@Service
public class AssetServiceImpl extends ServiceImpl<AssetDao, AssetEntity> implements AssetService {

    @Autowired
    private AssetDao assetDao;

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<AssetEntity> page = this.page(new Query<AssetEntity>().getPage(params),
                new QueryWrapper<AssetEntity>()
        );
        return new PageUtils(page);
    }
}
